package com.lei.design.factory.pizza;

import com.lei.design.factory.pizza.pizza.Pizza;
import com.lei.design.factory.pizza.store.ChicagoPizzaStore;
import com.lei.design.factory.pizza.store.NYPizzaStore;
import com.lei.design.factory.pizza.store.PizzaStore;

/**
 * @Author LeiXiaoLei
 * @Date 2022/5/17 17:18
 * @Version 1.0
 */
public class Main {
    public static void main(String[] args) {
        PizzaStore nyStore = new NYPizzaStore();
        Pizza nyPizza = nyStore.orderPizza("cheese");
        System.out.println("LeiXiaoLei ordered a " + nyPizza.getName());
        System.out.println("===============================");
        PizzaStore chicagoStore = new ChicagoPizzaStore();
        Pizza chicagoPizza = chicagoStore.orderPizza("cheese");
        System.out.println("ZhangSan ordered a " + chicagoPizza.getName());
    }
}
